Tidal volume measurement